<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8"/>
  <title>替换2.x过滤器的写法</title>
  <style>
    [v-cloak] {
      display: none;
    }
  </style>
</head>
<body>

  <div id="app" v-cloak>
    {{rmb(money)}}
  </div>
  
  <script src="../lib/vue.3.4.js"></script>
  <script>
    const app = Vue.createApp({
      data () {
        return {
          money: 10.444999
        }
      },
      methods: {
        rmb (data) {
          return data.toFixed(2) + '元';
        }
      }
    }).mount('#app');
  </script>
</body> 
</html>